package com.cmcc.zysoft.infocollection.model;

// Generated 2013-8-13 17:12:20 by Hibernate Tools 3.2.2.GA

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Industry generated by hbm2java
 */

@Entity
@Table(name = "tb_b_industry")
public class Industry implements java.io.Serializable {

	private static final long serialVersionUID = -8806810435607882217L;
	private String industryId;
	private Channel channel;
	private String industryName;
	private BigDecimal industryLife;
	private String mark1;
	private String mark2;
	private String mark3;
	private String mark4;
	private Set<ResourceProperty> resourceProperties = new HashSet<ResourceProperty>(0);
	private Set<ServiceItem> serviceItems = new HashSet<ServiceItem>(0);

	public Industry() {
	}

	public Industry(String industryId) {
		this.industryId = industryId;
	}

	public Industry(String industryId, Channel channel, String industryName,
			BigDecimal industryLife, String mark1, String mark2, String mark3,
			String mark4, Set<ResourceProperty> resourceProperties,
			Set<ServiceItem> serviceItems) {
		this.industryId = industryId;
		this.channel = channel;
		this.industryName = industryName;
		this.industryLife = industryLife;
		this.mark1 = mark1;
		this.mark2 = mark2;
		this.mark3 = mark3;
		this.mark4 = mark4;
		this.resourceProperties = resourceProperties;
		this.serviceItems = serviceItems;
	}

	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "industry_id", unique = true, nullable = false, length = 32)
	public String getIndustryId() {
		return this.industryId;
	}

	public void setIndustryId(String industryId) {
		this.industryId = industryId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "channel_id")
	public Channel getChannel() {
		return this.channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

	@Column(name = "industry_name", length = 200)
	public String getIndustryName() {
		return this.industryName;
	}

	public void setIndustryName(String industryName) {
		this.industryName = industryName;
	}

	@Column(name = "industry_life", precision = 7)
	public BigDecimal getIndustryLife() {
		return this.industryLife;
	}

	public void setIndustryLife(BigDecimal industryLife) {
		this.industryLife = industryLife;
	}

	@Column(name = "mark1", length = 200)
	public String getMark1() {
		return this.mark1;
	}

	public void setMark1(String mark1) {
		this.mark1 = mark1;
	}

	@Column(name = "mark2", length = 200)
	public String getMark2() {
		return this.mark2;
	}

	public void setMark2(String mark2) {
		this.mark2 = mark2;
	}

	@Column(name = "mark3", length = 200)
	public String getMark3() {
		return this.mark3;
	}

	public void setMark3(String mark3) {
		this.mark3 = mark3;
	}

	@Column(name = "mark4", length = 200)
	public String getMark4() {
		return this.mark4;
	}

	public void setMark4(String mark4) {
		this.mark4 = mark4;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "industry")
	public Set<ResourceProperty> getResourceProperties() {
		return this.resourceProperties;
	}

	public void setResourceProperties(Set<ResourceProperty> resourceProperties) {
		this.resourceProperties = resourceProperties;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "industry")
	public Set<ServiceItem> getServiceItems() {
		return this.serviceItems;
	}

	public void setServiceItems(Set<ServiceItem> serviceItems) {
		this.serviceItems = serviceItems;
	}
}